package club.dmyang.common.util;

import java.util.Random;

/**
 * Created by brss on 2018/7/16.
 */
public class RandomUtil {

    /**
     * generate a number between [left,right]
     * @param left
     * @param right
     * @return
     */
    public static int generateOneNum(int left,int right){
        Random r = new Random();
        return r.nextInt(right-left+1)+left;
    }
}
